// This file was generated automatically. See  generateTestDataForTypeScriptWithFileExport.kt
// DO NOT MODIFY IT MANUALLY.

// CHECK_TYPESCRIPT_DECLARATIONS
// RUN_PLAIN_BOX_FUNCTION
// SKIP_NODE_JS
// INFER_MAIN_MODULE
// MODULE: JS_TESTS
// WITH_STDLIB
// FILE: primitives.kt

@file:JsExport

package foo


val _any: Any = Any()


fun _nothing(): Nothing { throw Throwable() }


val _throwable: Throwable = Throwable()


val _string: String = "ZZZ"


val _boolean: Boolean = true


val _char: Char = 'ё'


val _byte: Byte = 1.toByte()

val _short: Short = 1.toShort()

val _int: Int = 1

val _float: Float = 1.0f

val _double: Double = 1.0


val _ubyte: UByte = UByte.MAX_VALUE

val _ushort: UShort = UShort.MAX_VALUE

val _uint: UInt = UInt.MAX_VALUE


val _byte_array: ByteArray = byteArrayOf()

val _short_array: ShortArray = shortArrayOf()

val _int_array: IntArray = intArrayOf()

val _float_array: FloatArray = floatArrayOf()

val _double_array: DoubleArray = doubleArrayOf()

val _boolean_array: BooleanArray = booleanArrayOf()

val _char_array: CharArray = charArrayOf()


val _ubyte_array: UByteArray = ubyteArrayOf(_ubyte)

val _ushort_array: UShortArray = ushortArrayOf(_ushort)

val _uint_array: UIntArray = uintArrayOf(_uint)


val _array_byte: Array<Byte> = emptyArray()

val _array_short: Array<Short> = emptyArray()

val _array_int: Array<Int> = emptyArray()

val _array_float: Array<Float> = emptyArray()

val _array_double: Array<Double> = emptyArray()

val _array_string: Array<String> = emptyArray()

val _array_boolean: Array<Boolean> = emptyArray()

val _array_array_string: Array<Array<String>> = arrayOf(emptyArray())

val _array_array_int_array: Array<Array<IntArray>> = arrayOf(arrayOf(intArrayOf()))


val _array_ubyte: Array<UByte> = emptyArray()

val _array_ushort: Array<UShort> = emptyArray()

val _array_uint: Array<UInt> = emptyArray()


val _fun_unit: () -> Unit = { }

val _fun_int_unit: (Int) -> Unit = { x -> }


val _fun_boolean_int_string_intarray: (Boolean, Int, String) -> IntArray =
    { b, i, s -> intArrayOf(b.toString().length, i, s.length) }


val _curried_fun: (Int) -> (Int) -> (Int) -> (Int) -> (Int) -> Int =
    { x1 -> { x2 -> { x3 -> { x4 -> { x5 -> x1 + x2 + x3 + x4 + x5 } } } } }


val _higher_order_fun: ((Int) -> String, (String) -> Int) -> ((Int) -> Int) =
    { f1, f2 -> { x -> f2(f1(x)) } }


// Nullable types


val _n_any: Any? = Any()

// TODO:
// val _n_unit: Unit? = Unit


val _n_nothing: Nothing? = null


val _n_throwable: Throwable? = Throwable()


val _n_string: String? = "ZZZ"


val _n_boolean: Boolean? = true


val _n_byte: Byte? = 1.toByte()

// TODO: Char and Long


val _n_short_array: ShortArray? = shortArrayOf()


val _n_array_int: Array<Int>? = emptyArray()

val _array_n_int: Array<Int?> = emptyArray()

val _n_array_n_int: Array<Int?>? = emptyArray()


val _array_n_array_string: Array<Array<String>?> = arrayOf(arrayOf(":)"))


val _fun_n_int_unit: (int: Int?) -> Unit = { x -> }


val _fun_n_int_unit_class: Function1<@ParameterName("int") Int?, Unit> = { x -> }


val _kfun_n_int_unit: kotlin.reflect.KFunction1<Int?, Unit> = _fun_n_int_unit_class::invoke


val _fun_n_int_unit_suspend: suspend (int: Int?) -> Unit = { x -> }


val _fun_n_int_unit_suspend_class: kotlin.coroutines.SuspendFunction1<@ParameterName("int") Int?, Unit> = { x -> }


val _kfun_n_int_unit_suspend: kotlin.reflect.KSuspendFunction1<Int?, Unit> = _fun_n_int_unit_suspend::invoke


val _fun_n_boolean_n_int_n_string_n_intarray: (Boolean?, Int?, String?) -> IntArray? =
    { b, i, s -> null }


val _n_curried_fun: (Int?) -> (Int?) -> (Int?) -> Int? =
    { x1 -> { x2 -> { x3 -> (x1 ?: 0) + (x2 ?: 0) + (x3 ?: 0) } } }



val _n_higher_order_fun: ((Int?) -> String?, (String?) -> Int?) -> ((Int?) -> Int?) =
    { f1, f2 -> { x -> f2(f1(x)) } }